package com.etonedu.meals.enumeration;

public enum MessageEnum {
    /**
     * 业务类
     */
    ECB_1001("1001", "班牌整体刷新"),
    ECB_1002("1002", "班牌绑定模版通知"),
    ECB_1003("1003", "班牌解绑通知"),
    ECB_1004("1004", "班牌切换模版通知"),
    ECB_1005("1005", "通知更新"),
    ECB_1006("1006", "微官网更新"),
    ECB_1007("1007", "作业更新"),
    ECB_1008("1008", "班级相册更新"),
    ECB_1009("1009", "课表更新"),
    ECB_1010("1010", "发布排名更新（通过每天定时通知）"),
    ECB_1011("1011", "数据看板更新（定时+半实时通知）"),
    ECB_1012("1012", "每日值日更新"),
    ECB_1013("1013", "每周之星更新"),
    ECB_1014("1014", "媒体库更新"),
    ECB_1015("1015", "人脸照片更新"),
    ECB_1016("1016", "获取班级未读留言数"),
    ECB_1017("1017", "走班考勤课表更新"),

    /**
     * 操作类
     */
    ECB_2015("2015", "开关机时间段更新"),
    ECB_2016("2016", "开关屏时间段更新"),
    ECB_2017("2017", "手动关机"),
    ECB_2018("2018", "手动开屏"),
    ECB_2019("2019", "手动关屏"),
    ECB_2020("2020", "界面截屏"),
    ECB_2021("2021", "设置亮度"),
    ECB_2022("2022", "设置音量"),
    ECB_2023("2023", "考勤时间段更新"),
    ECB_2024("2024", "主动上报状态补报"),
    ECB_2025("2025", "主动上报信息补报"),
    ECB_2026("2026", "APP缓存刷新"),
    ECB_2027("2027", "APP版本更新"),
    ECB_2028("2028", "重启设备"),

    CAMERA("001010","相机"),

    // 依次类推

    // 分号结束符
    NONE("NONE", "空");


    private static final String TYPE_NONE = "未定义";
    private String type;
    private String name;
    private String desc;
    private String opType;

    private MessageEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setOpType(String opType) {
        this.opType = opType;
    }

    public String getOpType() {
        return this.opType;
    }

    public String getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static String getNameByType(String type) {
        for (MessageEnum respEnum : MessageEnum.values()) {
            if (type.equals(respEnum.getType())) {
                return respEnum.getName();
            }
        }
        return TYPE_NONE;
    }
}
